package com.horay.springclouddemo.sentinel.feign.client;

import com.horay.springclouddemo.sentinel.feign.fallback.SentinelFallbackClient;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Sentinel Feign 客户端
 *
 * @author heyingcheng
 * @date 2020/4/4 17:51
 */
@FeignClient(value = "demo-sentinel-client", fallback = SentinelFallbackClient.class)
@RequestMapping("circuit/breaker")
public interface SentinelFeignClient {

    @GetMapping("methodA")
    ResponseEntity methodA(@RequestParam Integer param);

}
